/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package nesemulator;

/**
 *
 * @author ebenj
 */
public class Opcodes {

    public static class OpCode {

        public enum AddressingModes {

            IMMDT, ZEROPAGE, ZEROPAGEX, ZEROPAGEY, ABSL, ABSLX, ABSLY,
            INDX, INDPOSTX, INDY, INDPOSTY, ACCUM, IMPLIED, INDIRECT, RELATIVE
        };

        public enum CycleVariations {

            SAME, DIFFERENT
        };

        public enum OpTypes {

            ADC, AND, ASL, BCC, BCS, BEQ, BIT, BMI, BNE, BPL, BRK, BVC,
            BVS, CLC, CLD, CLI, CLV, CMP, CPX, CPY, DEC, DEX, DEY, EOR, INC, INX,
            INY, JMP, JSR, LDA, LDX, LDY, LSR, NOP, ORA, PHA, PHP, PLA, PLP, ROL, ROR,
            RTI, RTS, SBC, SEC, SED, SEI, STA, STX, STY, TAX, TAY, TSX, TXA, TXS, TYA
        };
        public AddressingModes AddressingMode;
        public CycleVariations CycleVariation;
        public OpTypes OpType;
        public int Bytes;
        public int Cycles;

        public OpCode(AddressingModes addrMode, OpTypes type, int bytes, int cycles, CycleVariations variation) {
            this.AddressingMode = addrMode;
            this.OpType = type;
            this.Bytes = bytes;
            this.Cycles = cycles;
            this.CycleVariation = variation;
        }
    }
    private static OpCode[] opCodes;

    static {
        opCodes = new OpCode[256];

        opCodes[0x69] = new OpCode(OpCode.AddressingModes.IMMDT, OpCode.OpTypes.ADC, 2, 2, OpCode.CycleVariations.SAME);
        opCodes[0x65] = new OpCode(OpCode.AddressingModes.ZEROPAGE, OpCode.OpTypes.ADC, 2, 3, OpCode.CycleVariations.SAME);
        opCodes[0x75] = new OpCode(OpCode.AddressingModes.ZEROPAGEX, OpCode.OpTypes.ADC, 2, 4, OpCode.CycleVariations.SAME);
        opCodes[0x60] = new OpCode(OpCode.AddressingModes.ABSL, OpCode.OpTypes.ADC, 3, 4, OpCode.CycleVariations.SAME);
        opCodes[0x70] = new OpCode(OpCode.AddressingModes.ABSLX, OpCode.OpTypes.ADC, 3, 4, OpCode.CycleVariations.DIFFERENT);
        opCodes[0x79] = new OpCode(OpCode.AddressingModes.ABSLY, OpCode.OpTypes.ADC, 3, 4, OpCode.CycleVariations.DIFFERENT);
        opCodes[0x61] = new OpCode(OpCode.AddressingModes.INDX, OpCode.OpTypes.ADC, 2, 6, OpCode.CycleVariations.SAME);
        opCodes[0x71] = new OpCode(OpCode.AddressingModes.INDPOSTY, OpCode.OpTypes.ADC, 2, 5, OpCode.CycleVariations.DIFFERENT);
        opCodes[0x29] = new OpCode(OpCode.AddressingModes.IMMDT, OpCode.OpTypes.AND, 2, 2, OpCode.CycleVariations.SAME);
        opCodes[0x25] = new OpCode(OpCode.AddressingModes.ZEROPAGE, OpCode.OpTypes.AND, 2, 3, OpCode.CycleVariations.SAME);
        opCodes[0x35] = new OpCode(OpCode.AddressingModes.ZEROPAGEX, OpCode.OpTypes.AND, 2, 4, OpCode.CycleVariations.SAME);
        opCodes[0x2D] = new OpCode(OpCode.AddressingModes.ABSL, OpCode.OpTypes.AND, 3, 4, OpCode.CycleVariations.SAME);
        opCodes[0x3D] = new OpCode(OpCode.AddressingModes.ABSLX, OpCode.OpTypes.AND, 3, 4, OpCode.CycleVariations.DIFFERENT);
        opCodes[0x39] = new OpCode(OpCode.AddressingModes.ABSLY, OpCode.OpTypes.AND, 3, 4, OpCode.CycleVariations.DIFFERENT);
        opCodes[0x21] = new OpCode(OpCode.AddressingModes.INDX, OpCode.OpTypes.AND, 2, 6, OpCode.CycleVariations.SAME);
        opCodes[0x31] = new OpCode(OpCode.AddressingModes.INDY, OpCode.OpTypes.AND, 2, 5, OpCode.CycleVariations.SAME);
        opCodes[0x0A] = new OpCode(OpCode.AddressingModes.ACCUM, OpCode.OpTypes.ASL, 1, 2, OpCode.CycleVariations.SAME);
        opCodes[0x06] = new OpCode(OpCode.AddressingModes.ZEROPAGE, OpCode.OpTypes.ASL, 2, 5, OpCode.CycleVariations.SAME);
        opCodes[0x16] = new OpCode(OpCode.AddressingModes.ZEROPAGEX, OpCode.OpTypes.ASL, 2, 6, OpCode.CycleVariations.SAME);
        opCodes[0x0E] = new OpCode(OpCode.AddressingModes.ABSL, OpCode.OpTypes.ASL, 3, 6, OpCode.CycleVariations.SAME);
        opCodes[0x1E] = new OpCode(OpCode.AddressingModes.ABSLX, OpCode.OpTypes.ASL, 3, 7, OpCode.CycleVariations.SAME);
        opCodes[0x90] = new OpCode(OpCode.AddressingModes.RELATIVE, OpCode.OpTypes.BCC, 2, 2, OpCode.CycleVariations.DIFFERENT);
        opCodes[0xB0] = new OpCode(OpCode.AddressingModes.RELATIVE, OpCode.OpTypes.BCS, 2, 2, OpCode.CycleVariations.DIFFERENT);
        opCodes[0xF0] = new OpCode(OpCode.AddressingModes.RELATIVE, OpCode.OpTypes.BEQ, 2, 2, OpCode.CycleVariations.DIFFERENT);
        opCodes[0x24] = new OpCode(OpCode.AddressingModes.ZEROPAGE, OpCode.OpTypes.BIT, 2, 3, OpCode.CycleVariations.SAME);
        opCodes[0x2C] = new OpCode(OpCode.AddressingModes.ABSL, OpCode.OpTypes.BIT, 3, 4, OpCode.CycleVariations.SAME);
        opCodes[0x30] = new OpCode(OpCode.AddressingModes.RELATIVE, OpCode.OpTypes.BMI, 2, 2, OpCode.CycleVariations.DIFFERENT);
        opCodes[0xD0] = new OpCode(OpCode.AddressingModes.RELATIVE, OpCode.OpTypes.BNE, 2, 2, OpCode.CycleVariations.DIFFERENT);
        opCodes[0x10] = new OpCode(OpCode.AddressingModes.RELATIVE, OpCode.OpTypes.BPL, 2, 2, OpCode.CycleVariations.DIFFERENT);
        opCodes[0x00] = new OpCode(OpCode.AddressingModes.IMPLIED, OpCode.OpTypes.BRK, 1, 7, OpCode.CycleVariations.SAME);
        opCodes[0x50] = new OpCode(OpCode.AddressingModes.RELATIVE, OpCode.OpTypes.BVC, 2, 2, OpCode.CycleVariations.DIFFERENT);
        opCodes[0x70] = new OpCode(OpCode.AddressingModes.RELATIVE, OpCode.OpTypes.BVS, 2, 2, OpCode.CycleVariations.DIFFERENT);
        opCodes[0x18] = new OpCode(OpCode.AddressingModes.IMPLIED, OpCode.OpTypes.CLC, 1, 2, OpCode.CycleVariations.SAME);
        opCodes[0xD8] = new OpCode(OpCode.AddressingModes.IMPLIED, OpCode.OpTypes.CLD, 1, 2, OpCode.CycleVariations.SAME);
        opCodes[0x58] = new OpCode(OpCode.AddressingModes.IMPLIED, OpCode.OpTypes.CLI, 1, 2, OpCode.CycleVariations.SAME);
        opCodes[0xB8] = new OpCode(OpCode.AddressingModes.IMPLIED, OpCode.OpTypes.CLV, 1, 2, OpCode.CycleVariations.SAME);
        opCodes[0xC9] = new OpCode(OpCode.AddressingModes.IMMDT, OpCode.OpTypes.CMP, 2, 2, OpCode.CycleVariations.SAME);
        opCodes[0xC5] = new OpCode(OpCode.AddressingModes.ZEROPAGE, OpCode.OpTypes.CMP, 2, 3, OpCode.CycleVariations.SAME);
        opCodes[0xD5] = new OpCode(OpCode.AddressingModes.ZEROPAGEX, OpCode.OpTypes.CMP, 2, 4, OpCode.CycleVariations.SAME);
        opCodes[0xCD] = new OpCode(OpCode.AddressingModes.ABSL, OpCode.OpTypes.CMP, 3, 4, OpCode.CycleVariations.SAME);
        opCodes[0xDD] = new OpCode(OpCode.AddressingModes.ABSLX, OpCode.OpTypes.CMP, 3, 4, OpCode.CycleVariations.DIFFERENT);
        opCodes[0xD9] = new OpCode(OpCode.AddressingModes.ABSLY, OpCode.OpTypes.CMP, 3, 4, OpCode.CycleVariations.DIFFERENT);
        opCodes[0xC1] = new OpCode(OpCode.AddressingModes.INDX, OpCode.OpTypes.CMP, 2, 6, OpCode.CycleVariations.SAME);
        opCodes[0xD1] = new OpCode(OpCode.AddressingModes.INDPOSTY, OpCode.OpTypes.CMP, 2, 5, OpCode.CycleVariations.DIFFERENT);
        opCodes[0xE0] = new OpCode(OpCode.AddressingModes.IMMDT, OpCode.OpTypes.CPX, 2, 2, OpCode.CycleVariations.SAME);
        opCodes[0xE4] = new OpCode(OpCode.AddressingModes.ZEROPAGE, OpCode.OpTypes.CPX, 2, 3, OpCode.CycleVariations.SAME);
        opCodes[0xEC] = new OpCode(OpCode.AddressingModes.ABSL, OpCode.OpTypes.CPX, 3, 4, OpCode.CycleVariations.SAME);
        opCodes[0xC0] = new OpCode(OpCode.AddressingModes.IMMDT, OpCode.OpTypes.CPY, 2, 2, OpCode.CycleVariations.SAME);
        opCodes[0xC4] = new OpCode(OpCode.AddressingModes.ZEROPAGE, OpCode.OpTypes.CPY, 2, 3, OpCode.CycleVariations.SAME);
        opCodes[0xCC] = new OpCode(OpCode.AddressingModes.ABSL, OpCode.OpTypes.CPY, 3, 4, OpCode.CycleVariations.SAME);
        opCodes[0xC6] = new OpCode(OpCode.AddressingModes.ZEROPAGE, OpCode.OpTypes.DEC, 2, 5, OpCode.CycleVariations.SAME);
        opCodes[0xD6] = new OpCode(OpCode.AddressingModes.ZEROPAGEX, OpCode.OpTypes.DEC, 2, 6, OpCode.CycleVariations.SAME);
        opCodes[0xCE] = new OpCode(OpCode.AddressingModes.ABSL, OpCode.OpTypes.DEC, 3, 6, OpCode.CycleVariations.SAME);
        opCodes[0xDE] = new OpCode(OpCode.AddressingModes.ABSLX, OpCode.OpTypes.DEC, 3, 7, OpCode.CycleVariations.SAME);
        opCodes[0xCA] = new OpCode(OpCode.AddressingModes.IMPLIED, OpCode.OpTypes.DEX, 1, 2, OpCode.CycleVariations.SAME);
        opCodes[0x88] = new OpCode(OpCode.AddressingModes.IMPLIED, OpCode.OpTypes.DEY, 1, 2, OpCode.CycleVariations.SAME);
        opCodes[0x49] = new OpCode(OpCode.AddressingModes.IMMDT, OpCode.OpTypes.EOR, 2, 2, OpCode.CycleVariations.SAME);
        opCodes[0x45] = new OpCode(OpCode.AddressingModes.ZEROPAGE, OpCode.OpTypes.EOR, 2, 3, OpCode.CycleVariations.SAME);
        opCodes[0x55] = new OpCode(OpCode.AddressingModes.ZEROPAGEX, OpCode.OpTypes.EOR, 2, 4, OpCode.CycleVariations.SAME);
        opCodes[0x4D] = new OpCode(OpCode.AddressingModes.ABSL, OpCode.OpTypes.EOR, 3, 4, OpCode.CycleVariations.SAME);
        opCodes[0x50] = new OpCode(OpCode.AddressingModes.ABSLX, OpCode.OpTypes.EOR, 3, 4, OpCode.CycleVariations.DIFFERENT);
        opCodes[0x59] = new OpCode(OpCode.AddressingModes.ABSLY, OpCode.OpTypes.EOR, 3, 4, OpCode.CycleVariations.DIFFERENT);
        opCodes[0x41] = new OpCode(OpCode.AddressingModes.INDX, OpCode.OpTypes.EOR, 2, 6, OpCode.CycleVariations.SAME);
        opCodes[0x51] = new OpCode(OpCode.AddressingModes.INDPOSTY, OpCode.OpTypes.EOR, 2, 5, OpCode.CycleVariations.DIFFERENT);
        opCodes[0xE6] = new OpCode(OpCode.AddressingModes.ZEROPAGE, OpCode.OpTypes.INC, 2, 5, OpCode.CycleVariations.SAME);
        opCodes[0xF6] = new OpCode(OpCode.AddressingModes.ZEROPAGEX, OpCode.OpTypes.INC, 2, 6, OpCode.CycleVariations.SAME);
        opCodes[0xEE] = new OpCode(OpCode.AddressingModes.ABSL, OpCode.OpTypes.INC, 3, 6, OpCode.CycleVariations.SAME);
        opCodes[0xFE] = new OpCode(OpCode.AddressingModes.ABSLX, OpCode.OpTypes.INC, 3, 7, OpCode.CycleVariations.SAME);
        opCodes[0xE8] = new OpCode(OpCode.AddressingModes.IMPLIED, OpCode.OpTypes.INX, 1, 2, OpCode.CycleVariations.SAME);
        opCodes[0xC8] = new OpCode(OpCode.AddressingModes.IMPLIED, OpCode.OpTypes.INY, 1, 2, OpCode.CycleVariations.SAME);
        opCodes[0x4C] = new OpCode(OpCode.AddressingModes.ABSL, OpCode.OpTypes.JMP, 3, 3, OpCode.CycleVariations.SAME);
        opCodes[0x6C] = new OpCode(OpCode.AddressingModes.INDIRECT, OpCode.OpTypes.JMP, 3, 5, OpCode.CycleVariations.SAME);
        opCodes[0x20] = new OpCode(OpCode.AddressingModes.ABSL, OpCode.OpTypes.JSR, 3, 6, OpCode.CycleVariations.SAME);
        opCodes[0xA9] = new OpCode(OpCode.AddressingModes.IMMDT, OpCode.OpTypes.LDA, 2, 2, OpCode.CycleVariations.SAME);
        opCodes[0xA5] = new OpCode(OpCode.AddressingModes.ZEROPAGE, OpCode.OpTypes.LDA, 2, 3, OpCode.CycleVariations.SAME);
        opCodes[0xB5] = new OpCode(OpCode.AddressingModes.ZEROPAGEX, OpCode.OpTypes.LDA, 2, 4, OpCode.CycleVariations.SAME);
        opCodes[0xAD] = new OpCode(OpCode.AddressingModes.ABSL, OpCode.OpTypes.LDA, 3, 4, OpCode.CycleVariations.SAME);
        opCodes[0xBD] = new OpCode(OpCode.AddressingModes.ABSLX, OpCode.OpTypes.LDA, 3, 4, OpCode.CycleVariations.DIFFERENT);
        opCodes[0xB9] = new OpCode(OpCode.AddressingModes.ABSLY, OpCode.OpTypes.LDA, 3, 4, OpCode.CycleVariations.DIFFERENT);
        opCodes[0xA1] = new OpCode(OpCode.AddressingModes.INDX, OpCode.OpTypes.LDA, 2, 6, OpCode.CycleVariations.SAME);
        opCodes[0xB1] = new OpCode(OpCode.AddressingModes.INDPOSTY, OpCode.OpTypes.LDA, 2, 5, OpCode.CycleVariations.DIFFERENT);
        opCodes[0xA2] = new OpCode(OpCode.AddressingModes.IMMDT, OpCode.OpTypes.LDX, 2, 2, OpCode.CycleVariations.SAME);
        opCodes[0xA6] = new OpCode(OpCode.AddressingModes.ZEROPAGE, OpCode.OpTypes.LDX, 2, 3, OpCode.CycleVariations.SAME);
        opCodes[0xB6] = new OpCode(OpCode.AddressingModes.ZEROPAGEY, OpCode.OpTypes.LDX, 2, 4, OpCode.CycleVariations.SAME);
        opCodes[0xAE] = new OpCode(OpCode.AddressingModes.ABSL, OpCode.OpTypes.LDX, 3, 4, OpCode.CycleVariations.SAME);
        opCodes[0xBE] = new OpCode(OpCode.AddressingModes.ABSLY, OpCode.OpTypes.LDX, 3, 4, OpCode.CycleVariations.DIFFERENT);
        opCodes[0xA0] = new OpCode(OpCode.AddressingModes.IMMDT, OpCode.OpTypes.LDY, 2, 2, OpCode.CycleVariations.SAME);
        opCodes[0xA4] = new OpCode(OpCode.AddressingModes.ZEROPAGE, OpCode.OpTypes.LDY, 2, 3, OpCode.CycleVariations.SAME);
        opCodes[0xB4] = new OpCode(OpCode.AddressingModes.ZEROPAGEX, OpCode.OpTypes.LDY, 2, 4, OpCode.CycleVariations.SAME);
        opCodes[0xAC] = new OpCode(OpCode.AddressingModes.ABSL, OpCode.OpTypes.LDY, 3, 4, OpCode.CycleVariations.SAME);
        opCodes[0xBC] = new OpCode(OpCode.AddressingModes.ABSLX, OpCode.OpTypes.LDY, 3, 4, OpCode.CycleVariations.DIFFERENT);
        opCodes[0x4A] = new OpCode(OpCode.AddressingModes.ACCUM, OpCode.OpTypes.LSR, 1, 2, OpCode.CycleVariations.SAME);
        opCodes[0x46] = new OpCode(OpCode.AddressingModes.ZEROPAGE, OpCode.OpTypes.LSR, 2, 5, OpCode.CycleVariations.SAME);
        opCodes[0x56] = new OpCode(OpCode.AddressingModes.ZEROPAGEX, OpCode.OpTypes.LSR, 2, 6, OpCode.CycleVariations.SAME);
        opCodes[0x4E] = new OpCode(OpCode.AddressingModes.ABSL, OpCode.OpTypes.LSR, 3, 6, OpCode.CycleVariations.SAME);
        opCodes[0x5E] = new OpCode(OpCode.AddressingModes.ABSLX, OpCode.OpTypes.LSR, 3, 7, OpCode.CycleVariations.SAME);
        opCodes[0xEA] = new OpCode(OpCode.AddressingModes.IMPLIED, OpCode.OpTypes.NOP, 1, 2, OpCode.CycleVariations.SAME);
        opCodes[0x09] = new OpCode(OpCode.AddressingModes.IMMDT, OpCode.OpTypes.ORA, 2, 2, OpCode.CycleVariations.SAME);
        opCodes[0x05] = new OpCode(OpCode.AddressingModes.ZEROPAGE, OpCode.OpTypes.ORA, 2, 3, OpCode.CycleVariations.SAME);
        opCodes[0x15] = new OpCode(OpCode.AddressingModes.ZEROPAGEX, OpCode.OpTypes.ORA, 2, 4, OpCode.CycleVariations.SAME);
        opCodes[0x0D] = new OpCode(OpCode.AddressingModes.ABSL, OpCode.OpTypes.ORA, 3, 4, OpCode.CycleVariations.SAME);
        opCodes[0x1D] = new OpCode(OpCode.AddressingModes.ABSLX, OpCode.OpTypes.ORA, 3, 4, OpCode.CycleVariations.DIFFERENT);
        opCodes[0x19] = new OpCode(OpCode.AddressingModes.ABSLY, OpCode.OpTypes.ORA, 3, 4, OpCode.CycleVariations.DIFFERENT);
        opCodes[0x01] = new OpCode(OpCode.AddressingModes.INDX, OpCode.OpTypes.ORA, 2, 6, OpCode.CycleVariations.SAME);
        opCodes[0x11] = new OpCode(OpCode.AddressingModes.INDPOSTY, OpCode.OpTypes.ORA, 2, 5, OpCode.CycleVariations.SAME);
        opCodes[0x48] = new OpCode(OpCode.AddressingModes.IMPLIED, OpCode.OpTypes.PHA, 1, 3, OpCode.CycleVariations.SAME);
        opCodes[0x08] = new OpCode(OpCode.AddressingModes.IMPLIED, OpCode.OpTypes.PHP, 1, 3, OpCode.CycleVariations.SAME);
        opCodes[0x68] = new OpCode(OpCode.AddressingModes.IMPLIED, OpCode.OpTypes.PLA, 1, 4, OpCode.CycleVariations.SAME);
        opCodes[0x28] = new OpCode(OpCode.AddressingModes.IMPLIED, OpCode.OpTypes.PLP, 1, 4, OpCode.CycleVariations.SAME);
        opCodes[0x2A] = new OpCode(OpCode.AddressingModes.ACCUM, OpCode.OpTypes.ROL, 1, 2, OpCode.CycleVariations.SAME);
        opCodes[0x26] = new OpCode(OpCode.AddressingModes.ZEROPAGE, OpCode.OpTypes.ROL, 2, 5, OpCode.CycleVariations.SAME);
        opCodes[0x36] = new OpCode(OpCode.AddressingModes.ZEROPAGEX, OpCode.OpTypes.ROL, 2, 6, OpCode.CycleVariations.SAME);
        opCodes[0x2E] = new OpCode(OpCode.AddressingModes.ABSL, OpCode.OpTypes.ROL, 3, 6, OpCode.CycleVariations.SAME);
        opCodes[0x3E] = new OpCode(OpCode.AddressingModes.ABSLX, OpCode.OpTypes.ROL, 3, 7, OpCode.CycleVariations.SAME);
        opCodes[0x6A] = new OpCode(OpCode.AddressingModes.ACCUM, OpCode.OpTypes.ROR, 1, 2, OpCode.CycleVariations.SAME);
        opCodes[0x66] = new OpCode(OpCode.AddressingModes.ZEROPAGE, OpCode.OpTypes.ROR, 2, 5, OpCode.CycleVariations.SAME);
        opCodes[0x76] = new OpCode(OpCode.AddressingModes.ZEROPAGEX, OpCode.OpTypes.ROR, 2, 6, OpCode.CycleVariations.SAME);
        opCodes[0x6E] = new OpCode(OpCode.AddressingModes.ABSL, OpCode.OpTypes.ROR, 3, 6, OpCode.CycleVariations.SAME);
        opCodes[0x7E] = new OpCode(OpCode.AddressingModes.ABSLX, OpCode.OpTypes.ROR, 3, 7, OpCode.CycleVariations.SAME);
        opCodes[0x40] = new OpCode(OpCode.AddressingModes.IMPLIED, OpCode.OpTypes.RTI, 1, 6, OpCode.CycleVariations.SAME);
        opCodes[0x60] = new OpCode(OpCode.AddressingModes.IMPLIED, OpCode.OpTypes.RTS, 1, 6, OpCode.CycleVariations.SAME);
        opCodes[0xE9] = new OpCode(OpCode.AddressingModes.IMMDT, OpCode.OpTypes.SBC, 2, 2, OpCode.CycleVariations.SAME);
        opCodes[0xE5] = new OpCode(OpCode.AddressingModes.ZEROPAGE, OpCode.OpTypes.SBC, 2, 3, OpCode.CycleVariations.SAME);
        opCodes[0xF5] = new OpCode(OpCode.AddressingModes.ZEROPAGEX, OpCode.OpTypes.SBC, 2, 4, OpCode.CycleVariations.SAME);
        opCodes[0xED] = new OpCode(OpCode.AddressingModes.ABSL, OpCode.OpTypes.SBC, 3, 4, OpCode.CycleVariations.SAME);
        opCodes[0xFD] = new OpCode(OpCode.AddressingModes.ABSLX, OpCode.OpTypes.SBC, 3, 4, OpCode.CycleVariations.DIFFERENT);
        opCodes[0xF9] = new OpCode(OpCode.AddressingModes.ABSLY, OpCode.OpTypes.SBC, 3, 4, OpCode.CycleVariations.DIFFERENT);
        opCodes[0xE1] = new OpCode(OpCode.AddressingModes.INDX, OpCode.OpTypes.SBC, 2, 6, OpCode.CycleVariations.SAME);
        opCodes[0xF1] = new OpCode(OpCode.AddressingModes.INDPOSTY, OpCode.OpTypes.SBC, 2, 5, OpCode.CycleVariations.SAME);
        opCodes[0x38] = new OpCode(OpCode.AddressingModes.IMPLIED, OpCode.OpTypes.SEC, 1, 2, OpCode.CycleVariations.SAME);
        opCodes[0xF8] = new OpCode(OpCode.AddressingModes.IMPLIED, OpCode.OpTypes.SED, 1, 2, OpCode.CycleVariations.SAME);
        opCodes[0x78] = new OpCode(OpCode.AddressingModes.IMPLIED, OpCode.OpTypes.SEI, 1, 2, OpCode.CycleVariations.SAME);
        opCodes[0x85] = new OpCode(OpCode.AddressingModes.ZEROPAGE, OpCode.OpTypes.STA, 2, 3, OpCode.CycleVariations.SAME);
        opCodes[0x95] = new OpCode(OpCode.AddressingModes.ZEROPAGEX, OpCode.OpTypes.STA, 2, 4, OpCode.CycleVariations.SAME);
        opCodes[0x8D] = new OpCode(OpCode.AddressingModes.ABSL, OpCode.OpTypes.STA, 3, 4, OpCode.CycleVariations.SAME);
        opCodes[0x9D] = new OpCode(OpCode.AddressingModes.ABSLX, OpCode.OpTypes.STA, 3, 5, OpCode.CycleVariations.SAME);
        opCodes[0x99] = new OpCode(OpCode.AddressingModes.ABSLY, OpCode.OpTypes.STA, 3, 5, OpCode.CycleVariations.SAME);
        opCodes[0x81] = new OpCode(OpCode.AddressingModes.INDX, OpCode.OpTypes.STA, 2, 6, OpCode.CycleVariations.SAME);
        opCodes[0x91] = new OpCode(OpCode.AddressingModes.INDPOSTY, OpCode.OpTypes.STA, 2, 6, OpCode.CycleVariations.SAME);
        opCodes[0x86] = new OpCode(OpCode.AddressingModes.ZEROPAGE, OpCode.OpTypes.STX, 2, 3, OpCode.CycleVariations.SAME);
        opCodes[0x96] = new OpCode(OpCode.AddressingModes.ZEROPAGEY, OpCode.OpTypes.STX, 2, 4, OpCode.CycleVariations.SAME);
        opCodes[0x8E] = new OpCode(OpCode.AddressingModes.ABSL, OpCode.OpTypes.STX, 3, 4, OpCode.CycleVariations.SAME);
        opCodes[0x84] = new OpCode(OpCode.AddressingModes.ZEROPAGE, OpCode.OpTypes.STY, 2, 3, OpCode.CycleVariations.SAME);
        opCodes[0x94] = new OpCode(OpCode.AddressingModes.ZEROPAGEX, OpCode.OpTypes.STY, 2, 4, OpCode.CycleVariations.SAME);
        opCodes[0x8C] = new OpCode(OpCode.AddressingModes.ABSL, OpCode.OpTypes.STY, 3, 4, OpCode.CycleVariations.SAME);
        opCodes[0xAA] = new OpCode(OpCode.AddressingModes.IMPLIED, OpCode.OpTypes.TAX, 1, 2, OpCode.CycleVariations.SAME);
        opCodes[0xA8] = new OpCode(OpCode.AddressingModes.IMPLIED, OpCode.OpTypes.TAY, 1, 2, OpCode.CycleVariations.SAME);
        opCodes[0xBA] = new OpCode(OpCode.AddressingModes.IMPLIED, OpCode.OpTypes.TSX, 1, 2, OpCode.CycleVariations.SAME);
        opCodes[0x8A] = new OpCode(OpCode.AddressingModes.IMPLIED, OpCode.OpTypes.TXA, 1, 2, OpCode.CycleVariations.SAME);
        opCodes[0x9A] = new OpCode(OpCode.AddressingModes.IMPLIED, OpCode.OpTypes.TXS, 1, 2, OpCode.CycleVariations.SAME);
        opCodes[0x98] = new OpCode(OpCode.AddressingModes.IMPLIED, OpCode.OpTypes.TYA, 1, 2, OpCode.CycleVariations.SAME);
    }
}
